<%@ include file="/WEB-INF/template/include.jsp" %>

<openmrs:require privilege="Manage Privileges" otherwise="/login.htm" redirect="/admin/users/obligationcontext.form" />

<%@ include file="/WEB-INF/template/header.jsp" %>
<%@ include file="localHeader.jsp" %>

<h2>Obligation Context Management</h2>	

<spring:hasBindErrors name="obligationContext">
	<openmrs:message code="fix.error"/>
	<div class="error">
		<c:forEach items="${errors.allErrors}" var="error">
			<openmrs:message code="${error.code}" text="${error.code}"/><br/>
		</c:forEach>
	</div>
</spring:hasBindErrors>

<form method="post">
	<table>
		<tr>
			<th><openmrs:message code="general.id"/></th>
			<td>
				<spring:bind path="obligationContext.obligationId">
					<input type="text" name="obligationId">
				</spring:bind>
			</td>
		</tr>
		<tr>
			<th valign="top"><openmrs:message code="ObligationContext.name"/></th>
			<td valign="top">
					<spring:bind path="obligationContext.contextName">
						<input type="text" name="contextName">
					</spring:bind>
			</td>
		</tr>
		<tr>
			<th valign="top"><openmrs:message code="general.description"/></th>
			<td valign="top">
					<spring:bind path="obligationContext.description">
						<textarea name="description" rows="3" cols="50"></textarea>
					</spring:bind>
			</td>
		</tr>
		<tr>
			<th valign="top"><openmrs:message code="ObligationContext.value"/></th>
			<td valign="top">
					<spring:bind path="obligationContext.value">
						<input type="text" name="value">
					</spring:bind>
			</td>
		</tr>
	</table>
	<input type="submit" value="<openmrs:message code="ObligationContext.save"/>">
</form>
